<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="base.jsp"%>

<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="css/bootstrap.css" />
	<link rel="stylesheet" href="js/bootstrap.min.js" />
	<link href="css/bootstrap-responsive.css" rel="stylesheet">
    <link href="js/google-code-prettify/prettify.css" rel="stylesheet">
	<link rel="shortcut icon" href="img/logo.jpg">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="img/apple-touch-icon-57-precomposed.png">
	
	
	<script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/google-code-prettify/prettify.js"></script>
    <script type="text/javascript" src="js/bootstrap-transition.js"></script>
    <script type="text/javascript" src="js/bootstrap-alert.js"></script>
    <script type="text/javascript" src="js/bootstrap-modal.js"></script>
    <script type="text/javascript" src="js/bootstrap-dropdown.js"></script>
    <script type="text/javascript" src="js/bootstrap-tab.js"></script>
    <script type="text/javascript" src="js/bootstrap-tooltip.js"></script>
    <script type="text/javascript" src="js/bootstrap-button.js"></script>
	<style type="text/css">
		.navbar{
			background-color:#999999;
		
		}
		body{
			background-color:#F3F1EC;
		
		}
		#header{
			background:#F0F5F8;
			border: 1px solid #DADEE5;
			border-top-left-radius: 5px;
			border-top-right-radius: 5px;
			margin: 0;
			padding: 15px 30px;
		}
		#note{
			padding-bottom: 1em;
			position: relative;
			width: 698px;
			height:700px;
			float: left;
		
			border: 1px solid #DADEE5;
			border-top:none;
			margin:0px;
		
		}
		
		#left{
			padding-top:10px;
		}
		
		.getstart{
			background-color: #FFFAE7;
			border: 1px solid #CCCCCC;
			border-radius: 3px 3px 3px 3px;
			box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
			margin-top: 27px;
			padding: 12px;
			text-align: center;
			margin-left:67px;
			
		
		}
		.blank{
			
			text-align: center;
			width: 100%;
		
			
		}
	</style>
</head>
<body>
	<div id="container"> 
		<%@ include file="top.jsp"%>
		<div id="content">
			<div id="left" class="span3">
				<jsp:include page="lefttop.jsp">
					<jsp:param value="deal" name="tag"/>
				</jsp:include>
				<%@ include file="leftdown.jsp" %>
			
			</div>
			<div class="span9" style="margin-bottom:0px;border-radius: 3px 3px 0 0">
				<ul class="breadcrumb" style="margin-top:0px;margin-bottom:0px;border-radius:3px 3px 0 0;border-bottom:none;">
					<li class="active">
						<span style="font-size:20px;color:#000">修改：${deal.name }</span>
						<a href="deldeal.action?dealid=${deal.id }" style="margin-left:500px;font-size:16px">
							<img src="img/trash.png">删除${deal.name }交易
						</a>
					</li>
					
				</ul>
				
				<div class="well" style="border-radius:0;">
					<form action="savedeal.action" method="post">
					<input type="hidden" name="user.username" value="${session.nowUser.username}"/>
						<div class="info"><b> <h4> Who's this deal with?</h4></b></div>
						<span>Type the name of the other person or company</span><br>
						<img  style="display: none" id="persona" src="img/person.png">
						<img  style="display: none" id="companya" src="img/company.png">								
						<select name="dealtype.keya" style="width:100px">
								<option >Person</option>
								<option >Company</option>
						</select>
						<input type="hidden" value="${session.nowUser.id }" name="dealtype.userid">
						<input type="text" name="dealtype.valuea" class="span3" id="deala"/><br />
						<a id="person" href="#">Create a new person</a> with that name or 
						<a id="company" href="#">Create a new company</a>.
						<span></span>
						<div class="info"><b> <h4> Name the deal</h4></b></div>
						<input type="text" name="deal.name" class="span4" value="${deal.name }"/><br />
					
						<div class="info"><b> <h4> Describe the deal</h4></b></div>
						<textarea name="deal.cont" cols="80" rows="5" class="span4">${deal.cont }</textarea>
						
						<div class="info"><b> <h4> How much?</h4></b></div>
						<select name="deal.moneytype" style="width:90px;">
						    <option>${deal.moneytype }</option>
							<option>$</option>
							<option>￥</option>
						</select>
						<input type="text" name="deal.money"class="span2" value="${deal.money }"/>
						<select name="deal.state" class="span2">
							<option>${deal.state }</option>
							<option>Fix </option>
							<option >per hour</option>
							<option >per day </option>					
						</select>
						<div class="info"><b> <h4> Category</h4></b></div>
						<div style="padding-bottom:15px; border-bottom:2px solid #999999;">
							<select name="deal.type" id="">
								<option>${deal.type}</option>
								<option >Copywriting</option>
								<option >Project</option>
								<option >Web Design</option>
								<option >UI Design</option>
							</select>
							<a href="#" > Edit categories</a>
						</div>
						<input type="hidden" name="deal.userid" value="${session.nowUser.id }">
						<input type="hidden" name="deal.view" value="${deal.view }"/>
						<input type="hidden" name="deal.id" value="${deal.id }"/>
							<div style="margin-top:10px;">
							<button type="submit">edit this deal </button>or <a href="adddeal.action">cancel</a>
						</div>					
					</form>	
				</div>
			</div>
		</div>	
	</div>
	<script type="text/javascript">
			$(document).ready(function () {  
				$("#company").click(function(){
					
					$("#persona").hide();
					$("#companya").show();
					
				});	
				$("#person").click(function(){
					$("#companya").hide();
					$("#persona").show();
				});				
				$(".tip").tooltip();
			});  
	
	
	
	</script>
	
</body>
</html>